package com.formulas.certification.oauth;

import com.formulas.certification.api.OauthClientDetailsServiceI;
import com.formulas.certification.dto.OauthClientDetailsDeleteCmd;
import com.formulas.certification.dto.OauthClientDetailsInsertCmd;
import com.formulas.certification.dto.OauthClientDetailsQry;
import com.formulas.certification.dto.OauthClientDetailsUpdateCmd;
import com.formulas.certification.dto.data.OauthClientDetailsDTO;
import com.formulas.certification.oauth.executor.OauthClientDetailsDeleteCmdExe;
import com.formulas.certification.oauth.executor.OauthClientDetailsInsertCmdExe;
import com.formulas.certification.oauth.executor.OauthClientDetailsUpdateCmdExe;
import com.formulas.certification.oauth.executor.query.OauthClientDetailsQryExe;
import com.formulas.component.catchlog.CatchAndLog;
import com.formulas.component.dto.PageResponse;
import com.formulas.component.dto.Response;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @author yiwannuofulasi
 * @date 2023/6/13 11:15
 */
@Service
@CatchAndLog
public class OauthClientDetailsCustomServiceImpl implements OauthClientDetailsServiceI {

    @Resource
    private OauthClientDetailsInsertCmdExe oauthClientDetailsInsertCmdExe;

    @Resource
    private OauthClientDetailsUpdateCmdExe oauthClientDetailsUpdateCmdExe;

    @Resource
    private OauthClientDetailsDeleteCmdExe oauthClientDetailsDeleteCmdExe;

    @Resource
    private OauthClientDetailsQryExe oauthClientDetailsQryExe;

    @Override
    public Response insertOauthClientDetails(OauthClientDetailsInsertCmd oauthClientDetailsInsertCmd) {
        return oauthClientDetailsInsertCmdExe.execute(oauthClientDetailsInsertCmd);
    }

    @Override
    public Response updateOauthClientDetails(OauthClientDetailsUpdateCmd oauthClientDetailsUpdateCmd) {
        return oauthClientDetailsUpdateCmdExe.execute(oauthClientDetailsUpdateCmd);
    }

    @Override
    public Response deleteOauthClientDetailsByClientId(OauthClientDetailsDeleteCmd oauthClientDetailsDeleteCmd) {
        return oauthClientDetailsDeleteCmdExe.execute(oauthClientDetailsDeleteCmd);
    }

    @Override
    public PageResponse<OauthClientDetailsDTO> queryOauthClientDetailsPageList(OauthClientDetailsQry oauthClientDetailsQry) {
        return oauthClientDetailsQryExe.execute(oauthClientDetailsQry);
    }
}
